package com.gensdai.leliang;

import android.content.Intent;

import com.gensdai.leliang.base.BaseActionbarActivityNoRes;
import com.gensdai.leliang.base.BaseActivity;
import com.gensdai.leliang.utils.PreferencesUtils;

/**
 * Created by zsxx on 2017/9/11.
 */

public class WelcomeActivity extends BaseActivity {

    public static final String isoneto = "welcome3";
    private boolean isOne;

    @Override
    protected String getTitleStr() {
        return null;
    }

    @Override
    protected boolean isShowBackButton() {
        return false;
    }

    @Override
    protected boolean isCustomTitle() {
        return false;
    }

    @Override
    protected int getLayoutResource() {
        return R.layout.activity_welcome_step1;
    }

    @Override
    protected void onResume() {
        super.onResume();
        isOne = PreferencesUtils.getBooleanPreference(this,
                AppApplication.PREFERENCE_NAME, isoneto, true);

        if (isOne) {
            // 进入第一次安装欢迎界面
            startActivity(new Intent(this, WelcomeOne.class));
        } else {
            startActivity(new Intent(this, MainBottomNavigation.class));
        }
        finish();
    }
}
